Three dimensional shape measurement apparatus, control method therefor, and storage medium

ABSTRACT

A three dimensional shape measurement apparatus comprising: a projection unit configured to perform a projection operation to a measurement area; a photographing unit configured to photograph a target object in the measurement area undergoing the projection operation; and a measurement unit configured to measure a three dimensional shape of the target object based on the photographed image, wherein the measurement area includes a measurement reference surface serving as a reference for a focus position of a photographing optical system of the photographing unit, and is defined based on a projection range of the projection unit and a photographing range of the photographing unit, and the focus position is set deeper than a position of the measurement reference surface when observed from the photographing unit.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a three dimensional shape measurementapparatus, a control method therefor, and a storage medium.

2. Description of the Related Art

Several three dimensional shape measurement methods used in threedimensional shape measurement apparatuses have been proposed. Thepassive scheme in which shape measurement is performed using aphotographing apparatus alone without a projection apparatus, and theactive scheme in which a projection apparatus and a photographingapparatus are used in combination have been known. In the active scheme,the three dimensional shape of a target object is measured from an imageobtained by photographing the target object on which a specificprojection pattern is projected. Since the target object has a threedimensional shape, the three dimensional shape measurement apparatusneeds to satisfy the accuracy required for shape measurement in thedepth direction as well.

Japanese Patent Laid-Open Nos. 11-118443 and 2007-85862 discloseexamples of such an active three dimensional shape measurementapparatus. Japanese Patent Laid-Open No. 11-118443 discloses a techniqueof projecting a slit pattern onto a target object upon irradiation, andcontrolling a light source so that the integrated irradiation intensitydistribution has a triangular wave shape, thereby performing threedimensional shape measurement using the principle of the phase shiftmethod. Japanese Patent Laid-Open No. 2007-85862 discloses a techniqueof defocusing a projection pattern having a digital tone value to form asine wave pattern, thereby performing three dimensional shapemeasurement using the principle of the phase shift method, as inJapanese Patent Laid-Open No. 11-118443.

Unfortunately, the three dimensional shape measurement apparatusdescribed in Japanese Patent Laid-Open No. 11-118443 can hardly satisfythe required accuracy across the entire region, in the depth direction,of a target object placed on a measurement reference surface. Similarly,the three dimensional shape measurement apparatus described in JapanesePatent Laid-Open No. 2007-85862 can hardly satisfy the required accuracyacross the entire region of the target object in the depth direction.This is because the contrast of an image obtained by photographing thetarget object lowers as the defocus from the focal plane of aphotographing optical system becomes considerable, leading todegradation in accuracy of a three dimensional shape calculated from theimage with poorer contrast.

More specifically, as in Japanese Patent Laid-Open No. 11-118443, whenthe focal plane of a photographing optical system is defined as ameasurement reference surface, the contrast of an image obtained byphotographing a target object placed on the measurement referencesurface lowers in a direction away from the measurement referencesurface, resulting in degradation in measurement accuracy. Therefore,the measurement accuracy of the target object on the measurementreference surface is considerably poor on the face of the target objectclosest to the photographing apparatus, thus making it difficult tosatisfy the required accuracy across the entire region in the depthdirection.

Also, as in Japanese Patent Laid-Open No. 2007-85862, when the focalplane of a projection pattern falls outside a region where a targetobject is present, the contrast of the projection pattern lowers on thesurface of the target object from the face of the target object closerto the focal plane of the projection pattern to the face of the targetobject farther from the focal plane of the projection pattern.Accordingly, the contrast of the photographed image lowers, and themeasurement accuracy degrades, thus making it difficult to satisfy therequired accuracy across the entire region in the depth direction, as inJapanese Patent Laid-Open No. 11-118443.

SUMMARY OF THE INVENTION

The present invention has been made in consideration of theabove-mentioned problem, and provides a technique of suppressingdegradation in measurement accuracy in the depth direction to obtaingood measurement accuracy across the entire measurement area.

According to one aspect of the present invention, there is provided athree dimensional shape measurement apparatus comprising: a projectionunit configured to perform a projection operation to a measurement area;a photographing unit configured to photograph a target object in themeasurement area undergoing the projection operation; and a measurementunit configured to measure a three dimensional shape of the targetobject based on the photographed image, wherein the measurement areaincludes a measurement reference surface serving as a reference for afocus position of a photographing optical system of the photographingunit, and is defined based on a projection range of the projection unitand a photographing range of the photographing unit, and the focusposition is set deeper than a position of the measurement referencesurface when observed from the photographing unit.

According to one aspect of the present invention, there is provided acontrol method for a three dimensional shape measurement apparatusincluding a projection unit, a photographing unit, and a measurementunit, the method comprising: a projection step of causing the projectionunit to perform a projection operation to a measurement area; aphotographing step of causing the photographing unit to photograph atarget object in the measurement area undergoing the projectionoperation; and a measurement step of causing the measurement unit tomeasure a three dimensional shape of the target object based on thephotographed image, wherein the measurement area includes a measurementreference surface serving as a reference for a focus position of aphotographing optical system of the photographing unit, and is definedbased on a projection range of the projection unit and a photographingrange of the photographing unit, and the focus position is set deeperthan a position of the measurement reference surface when observed fromthe photographing unit.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a view showing the configuration of a three dimensional shapemeasurement apparatus according to the first embodiment;

FIG. 2 is a view showing a measurement reference surface and ameasurement area according to the first embodiment;

FIG. 3 is a view showing a projection pattern according to the firstembodiment;

FIG. 4 is a schematic view of an optical system according to the firstembodiment;

FIG. 5 is a schematic view of another optical system according to thefirst embodiment;

FIG. 6 is a view showing the configuration of a three dimensional shapemeasurement apparatus according to the second embodiment;

FIG. 7 is a view showing a measurement reference surface and ameasurement area according to the second embodiment;

FIG. 8 is a schematic view of an optical system according to the secondembodiment;

FIG. 9 is a schematic view of another optical system according to thesecond embodiment;

FIG. 10 is a view showing the configuration of a three dimensional shapemeasurement apparatus according to the third embodiment;

FIG. 11 is a view showing a measurement reference surface and ameasurement area according to the third embodiment;

FIG. 12 is a schematic view of an optical system according to the thirdembodiment;

FIGS. 13A to 13C are graphs each showing the relationship between thephotographing distance and the contrast, or that between thephotographing distance and the brightness of a photographed imageaccording to the first embodiment; and

FIGS. 14A and 14B are graphs each showing the relationship between thephotographing distance and the measurement error according to the firstembodiment.

DESCRIPTION OF THE EMBODIMENTS

An exemplary embodiment(s) of the present invention will now bedescribed in detail with reference to the drawings. It should be notedthat the relative arrangement of the components, the numericalexpressions and numerical values set forth in these embodiments do notlimit the scope of the present invention unless it is specificallystated otherwise.

First Embodiment

The configuration of a three dimensional shape measurement apparatusaccording to the first embodiment will be described with reference toFIG. 1. The three dimensional shape measurement apparatus includes aprojection unit 101, photographing unit 102, and control unit 103.

The projection unit 101 is a projector which performs a projectionoperation of projecting pattern light onto a target object 104. Theprojection unit 101 is capable of projection to an area indicated by aprojection range 105. The projection unit 101 has a projection axis andprojection image center which do not match each other, like a projectorused for upward projection in, for example, a conference room. Note thatthe projection axis means an optical axis extending toward theprojection center.

The photographing unit 102 is a camera which photographs the targetobject 104 onto which pattern light is projected. The photographing unit102 can photograph an area indicated by a photographing range 106. Thecontrol unit 103 is, for example, a personal computer and controls theoperations of the projection unit 101 and photographing unit 102. Thecontrol unit 103 also performs a process of measuring the threedimensional shape of the target object 104.

A measurement reference surface and a measurement area according to thefirst embodiment will be described next with reference to FIG. 2. Anoptical axis 107 extends from the projection unit 101 toward theprojection image center, and does not match the projection axis. Anoptical axis 108 is the optical axis of the photographing unit 102 (aphotographing axis extending toward the photographing center). Ameasurement reference surface 109 includes the point at which theoptical axes 107 and 108 intersect with each other. A measurement area110 is included in and defined by both the projection range 105 and thephotographing range 106. In this embodiment, the measurement referencesurface 109 is included in the measurement area 110, and located so asto bisect the depth of the measurement area 110 when observed from thephotographing unit 102. A measurement surface 116 is closest to theprojection unit 101 and photographing unit 102 in the measurement area110. A measurement surface 117 is farthest from the projection unit 101and photographing unit 102 in the measurement area 110. Although themeasurement reference surface 109 is set within the measurement area 110in this embodiment, its position is not limited to the interior of themeasurement area 110, and may be the exterior of the measurement area110.

The three dimensional shape measurement apparatus according to thisembodiment performs shape measurement using the space encoding method.First, the projection unit 101 projects a bright/dark pattern 111, asshown in FIG. 3, onto the target object 104. The photographing unit 102photographs the target object 104 onto which the bright/dark pattern 111is projected. The control unit 103 processes the image photographed bythe photographing unit 102 to measure the three dimensional shape of thetarget object 104. More specifically, the control unit 103 detects thebright/dark edge position of the bright/dark pattern 111 to calculatethe distances from the projection unit 101 and photographing unit 102 tothe target object 104 in accordance with the principle of triangulation,based on the angle that the projection axis of the projection unit 101makes with the photographing axis of the photographing unit 102corresponding to the detected edge position.

In this embodiment, the zero-crossing detection method is used as amethod of detecting the edge position of the bright/dark pattern 111.The zero-crossing detection method continuously projects patterns uponswitching between the bright/dark positions of the bright/dark pattern111 to determine, as an edge position, the intersection of the intensitydistributions of the images photographed by the photographing unit 102.

In the zero-crossing detection method, the detection accuracy of an edgeposition is generally known to improve as the contrast of a bright/darkpattern photographed by the photographing unit 102 increases. Also, theS/N ratio (signal-to-noise ratio) of the photographing unit 102 improvesas the brightness of an image photographed by the photographing unit 102increases. Hence, the detection accuracy of an edge position improves asthe brightness of an image projected by the projection unit 101increases.

The three dimensional shape measurement apparatus according to thisembodiment must perform shape measurement with an accuracy equal to orhigher than the required accuracy across the entire measurement area110. However, the contrast of an image photographed by the photographingunit 102 is high at a focus position, but lowers as the position in theimage deviates more from the focus position, as shown in FIG. 13A. Also,a brighter image is obtained as the angle of view increases with adecrease in distance from the photographing unit 102, but a darker imageis obtained as the angle of view decreases with an increase in distancefrom the photographing unit 102, as shown in FIG. 13B.

For this reason, when the focus position of the photographing unit 102is set on the measurement reference surface 109, the contrast lowers onthe measurement surface 116 due to defocus, but a photographed image isbright because the measurement surface 116 is close to the photographingunit 102. On the other hand, the contrast lowers on the measurementsurface 117 due to defocus, and a photographed image is dark because themeasurement surface 117 is far from the photographing unit 102.Therefore, the relationship between the photographing distance and themeasurement error is as shown in FIG. 14A, so the measurement accuracyis lower on the measurement surface 117 than on the measurement surface116.

To combat this problem, in this embodiment, the focus position of theprojection unit 101 is set on the measurement reference surface 109, andthe focus position of the photographing unit 102 is set on a positiondeeper from the photographing unit 102 than the measurement referencesurface 109.

FIG. 4 shows the focus position of the projection unit 101. A lens 112serves as the projection optical system of the projection unit 101,which is schematically represented as one lens. A display element 113displays a bright/dark pattern. The focus position of the projectionunit 101 is set on the measurement reference surface 109, as shown inFIG. 4.

On the other hand, FIG. 5 shows the focus position of the photographingunit 102. A lens 114 serves as a photographing optical system of thephotographing unit 102, which is schematically represented as one lens.An image sensing element 115 converts light incident from the lens 114into an electrical signal. The focus position of the photographing unit102 is set on a position deeper than the measurement reference surface109, as shown in FIG. 5.

With a configuration as shown in FIGS. 4 and 5, the contrast lowers moreconsiderably on the measurement surface 116 than on the measurementsurface 117 due to defocus of the photographing unit 102, as shown inFIG. 13C. Therefore, the relationship between the photographing distanceand the measurement error is as shown in FIG. 14B, so the measurementsurfaces 116 and 117 exhibit nearly the same measurement accuracy duenot only to the defocus but also to a change in brightness of aphotographed image, which depends on the distance from the photographingunit 102. Also, because the focus position of the photographing unit 102is deeper than the measurement reference surface 109, the contrastlowers on the measurement surface 117 less than the case wherein thefocus position of the photographing unit 102 is set on the measurementreference surface 109. This means that the measurement accuracy on themeasurement surface 117 is better than the case wherein the focusposition is set on the measurement reference surface 109. That is, themeasurement error falls within a predetermined range across the overallphotographing distance, thus making it possible to obtain apredetermined measurement accuracy as a whole without too muchdegradation.

As described above, a predetermined accuracy can be obtained across theentire measurement area 110 by setting the focus position of thephotographing unit 102 deeper than the measurement reference surface109. When the focus position of the photographing unit 102 is set on themeasurement reference surface 109, it is necessary to increase thecontrast of a photographed image by improving the imaging performance ofthe photographing unit 102 or increase the amount of light projected bythe projection unit 101, in order to obtain nearly the same measurementaccuracy as in this embodiment across the entire measurement area 110.However, this embodiment obviates the need for this operation and, inturn, obviates the need to improve the imaging performance of thephotographing unit 102 more than required. This makes it possible toreduce the number of lenses which constitute the photographing unit 102,leading to overall cost savings. Also, keeping the power of a lightsource of the projection unit 101 low makes it possible to reduce thepower consumption and the amount of heat generated by the light source,thus downsizing a cooling system and eventually the entire apparatus.

Note that as the measurement area has a larger depth, and the distancebetween the measurement surfaces 116 and 117 increases, the differencebetween the brightness of the photographed image of the measurementsurface 116 and that of the photographed image of the measurementsurface 117 increases, so the focus position of the photographing unit102 is set at a position closer to the measurement surface 117. Thismakes it possible to suppress a decrease in contrast on the measurementsurface 117 due to defocus, thus reducing degradation in accuracy on themeasurement surface 117.

Also, when the contrast considerably lowers due to defocus of the lens114 of the photographing unit 102, the focus position of thephotographing unit 102 is set at a position close to the measurementreference surface 109. This makes it possible to suppress a decrease incontrast on the measurement surface 116 due to defocus, thus reducingdegradation in accuracy on the measurement surface 116.

Note that as a method of setting the focus position of the photographingunit 102 on a position deeper than the measurement reference surface109, it may be done upon design of the photographing optical system ofthe photographing unit 102. Also, when the photographing unit 102 has anautofocus function, it may adopt a method of placing a focusing chart ata position on which the focus is to be adjusted, or a method ofadjusting the focus on the measurement reference surface 109 and thenadjusting the focus on a deep position using a focus adjusting lens.Moreover, if the focus position is too deep, the measurement accuracylocally becomes low, so the focus position is desirably set at anappropriate position in accordance with the relationship between thecontrast and the image brightness.

In this embodiment, three dimensional shape measurement is performedusing the space encoding method, and the zero-crossing detection methodis used as a method of detecting an edge position. However, the presentinvention is not limited to the zero-crossing detection method, and amethod of detecting an edge position using a differential filter ordetecting the barycenter of the intensity distribution may be used.Also, as a three dimensional shape measurement method, not only thespace encoding method but also the light-section method or the phaseshift method which projects a sine wave pattern may be used.

Second Embodiment

The configuration of a three dimensional shape measurement apparatusaccording to the second embodiment will be described with reference toFIG. 6. The three dimensional shape measurement apparatus includes aprojection unit 201, photographing unit 202, and control unit 203.

The projection unit 201 is a projector which performs a projectionoperation of projecting pattern light onto a target object 204. Theprojection unit 201 is capable of projection to an area indicated by aprojection range 205. The projection unit 201 has a projection axis andprojection image center which match each other, unlike the firstembodiment.

The photographing unit 202 is a camera which photographs the targetobject 204 onto which pattern light is projected. The photographing unit202 can photograph an area indicated by a photographing range 206. Thecontrol unit 203 is, for example, a personal computer and controls theoperations of the projection unit 201 and photographing unit 202. Thecontrol unit 203 also performs a process of measuring the threedimensional shape of the target object 204.

A measurement reference surface and a measurement area according to thesecond embodiment will be described next with reference to FIG. 7. Anoptical axis 207 extends from the projection unit 201 toward theprojection image center, and matches the projection axis. An opticalaxis 208 is the optical axis of the photographing unit 202 (aphotographing axis extending toward the photographing center). Ameasurement reference surface 209 includes the point at which theoptical axes 207 and 208 intersect with each other. A measurement area210 is included in and defined by both the projection range 205 and thephotographing range 206. In this embodiment, the measurement referencesurface 209 is included in the measurement area 210, and located so asto bisect the depth of the measurement area 210 when observed from thephotographing unit 202. A measurement surface 216 is closest to theprojection unit 201 and photographing unit 202 in the measurement area210. A measurement surface 217 is farthest from the projection unit 201and photographing unit 202 in the measurement area 210. Although themeasurement reference surface 209 is set within the measurement area 110in this embodiment, its position is not limited to the interior of themeasurement area 210, and may be the exterior of the measurement area210.

As in the first embodiment, the three dimensional shape measurementapparatus according to this embodiment performs shape measurement usingthe space encoding method, and uses the zero-crossing detection methodas a method of detecting an edge position.

In this embodiment as well, the focus position of the projection unit201 is set on the measurement reference surface 209, and the focusposition of the photographing unit 202 is set on a position deeper fromthe photographing unit 202 than the measurement reference surface 209.

FIG. 8 shows the focus position of the projection unit 201. A lens 212serves as the projection optical system of the projection unit 201,which is schematically represented as one lens. A display element 213displays a bright/dark pattern. The focus position of the projectionunit 201 is set on the measurement reference surface 209, as shown inFIG. 8.

On the other hand, FIG. 9 shows the focus position of the photographingunit 202. A lens 214 serves as a photographing optical system of thephotographing unit 202, which is schematically represented as one lens.An image sensing element 215 converts light incident from the lens 214into an electrical signal. The focus position of the photographing unit202 is set on a position deeper than the measurement reference surface209, as shown in FIG. 9.

With a configuration as shown in FIGS. 8 and 9, the contrast lowers moreconsiderably on the measurement surface 216 than on the measurementsurface 217 due to defocus of the photographing unit 202. Therefore, themeasurement surfaces 216 and 217 exhibit nearly the same measurementaccuracy due not only to the defocus but also to a change in brightnessof a photographed image, which depends on the distance from thephotographing unit 202. Also, because the focus position of thephotographing unit 202 is deeper than the measurement reference surface209, the contrast lowers on the measurement surface 217 less than thecase wherein the focus position of the photographing unit 202 is set onthe measurement reference surface 209. This means that the measurementaccuracy on the measurement surface 217 is better than the case whereinthe focus position is set on the measurement reference surface 209. Thatis, the measurement error falls within a predetermined range across theoverall photographing distance, thus making it possible to obtain apredetermined measurement accuracy as a whole without too muchdegradation.

As described above, a predetermined accuracy can be obtained across theentire measurement area 210 by setting the focus position of thephotographing unit 202 deeper than the measurement reference surface209. When the focus position of the photographing unit 202 is set on themeasurement reference surface 209, it is necessary to increase thecontrast of a photographed image by improving the imaging performance ofthe photographing unit 202 or increase the amount of light projected bythe projection unit 201, in order to obtain nearly the same measurementaccuracy as in this embodiment across the entire measurement area 210.However, this embodiment obviates the need for this operation and, inturn, obviates the need to improve the imaging performance of thephotographing unit 202 more than required. This makes it possible toreduce the number of lenses which constitute the photographing unit 202,leading to overall cost savings. Also, keeping the power of a lightsource of the projection unit 201 low makes it possible to reduce thepower consumption and the amount of heat generated by the light source,thus downsizing a cooling system and eventually the entire apparatus.

Third Embodiment

The configuration of a three dimensional shape measurement apparatusaccording to the third embodiment will be described with reference toFIG. 10. The three dimensional shape measurement apparatus includes aprojection unit 301, photographing unit 302, photographing unit (secondphotographing unit) 303, and control unit 304.

In this embodiment, the projection unit 301 uses the active stereoscheme, and therefore performs a projection operation of projecting asolid image onto a target object 305 or irradiating the target object305 using a light source. The projection unit 301 is capable ofprojection to an area indicated by a projection range 306.

Each of the photographing units 302 and 303 is a camera whichphotographs the target object 305 on which a specific projection patternis projected by the projection unit 301. The photographing unit 302 canphotograph an area indicated by a photographing range 307. Thephotographing unit 303 can photograph an area indicated by aphotographing range 308. That is, the photographing units 302 and 303photograph in different directions. The control unit 304 is, forexample, a personal computer and controls the operations of theprojection unit 301 and photographing units 302 and 303. The controlunit 304 also performs a process of measuring the three dimensionalshape of the target object 305.

A measurement reference surface and a measurement area according to thethird embodiment will be described next with reference to FIG. 11. Anoptical axis 309 is the optical axis of the photographing unit 302 (aphotographing axis extending toward the photographing center). Anoptical axis 310 is the optical axis of the photographing unit 303 (aphotographing axis extending toward the photographing center). Ameasurement reference surface 311 includes the point at which theprojection axis of the projection unit 301 intersects with each of theoptical axes 309 and 310. A measurement area 312 is included in anddefined by the projection range 306 and the photographing ranges 307 and308. In this embodiment, the measurement reference surface 311 isincluded in the measurement area 312, and located so as to bisect thedepth of the measurement area 312 when observed from the photographingunit 302. A measurement surface 313 is closest to the projection unit301 and photographing units 302 and 303 in the measurement area 312. Ameasurement surface 314 is farthest from the projection unit 301 andphotographing units 302 and 303 in the measurement area 312. Althoughthe measurement reference surface 311 is set within the measurement area312 in this embodiment, its position is not limited to the interior ofthe measurement area 312, and may be the exterior of the measurementarea 312.

Unlike the first and second embodiments, the three dimensional shapemeasurement apparatus according to this embodiment adopts the activestereo scheme (stereo method) in which the distance to the target object305 is calculated using the principle of triangulation from an imageobtained when each of the photographing units 302 and 303 photographsthe target object 305 on which a specific projection pattern isprojected by the projection unit 301. This obviates the need for theprojection unit 301 to project a pattern, so the projection unit 301need only project a solid image. Further, the projection unit 301 may bean illumination unit such as a light bulb.

In the active stereo scheme, a feature amount such as the edge of thetarget object 305 is detected from a photographed image and associatedwith an image photographed by each of the photographing units 302 and303, thereby performing triangulation. Hence, the higher the contrast ofthe edge of the target object 305 photographed by each of thephotographing units 302 and 303, the higher the detection accuracy of anedge position. Also, the higher the brightness of an image photographedby each of the photographing units 302 and 303, the better the S/N ratioof each of the photographing units 302 and 303. This means that thehigher the brightness of light projected by the projection unit 301, thehigher the detection accuracy of an edge position.

Hence, in this embodiment, as in the first and second embodiments, thefocus positions of the photographing units 302 and 303 are set onpositions deeper than the measurement reference surface 311.

FIG. 12 shows the focus positions of the photographing units 302 and303. A lens 315 serves as the photographing optical system of thephotographing unit 302, which is schematically represented as one lens.A lens 317 serves as the photographing optical system of thephotographing unit 303, which is schematically represented as one lens.Image sensing elements 316 and 318 convert light incident from thelenses 315 and 317, respectively, into electrical signals.

With a configuration as shown in FIG. 12, the contrast lowers moreconsiderably on the measurement surface 313 than on the measurementsurface 314 due to defocus of the photographing units 302 and 303.Therefore, the measurement surfaces 313 and 314 exhibit nearly the samemeasurement accuracy due not only to the defocus but also to a change inbrightness of a photographed image, which depends on the distance fromeach of the photographing units 302 and 303. Also, because the focuspositions of the photographing units 302 and 303 are deeper than themeasurement reference surface 311, the contrast lowers on themeasurement surface 314 less than the case wherein the focus positionsof the photographing units 302 and 303 are set on the measurementreference surface 311. This means that the measurement accuracy on themeasurement surface 314 is better than the case wherein the focuspositions are set on the measurement reference surface 311. That is, themeasurement error falls within a predetermined range across the overallphotographing distance, thus making it possible to obtain apredetermined measurement accuracy as a whole without too muchdegradation.

As described above, a predetermined accuracy can be obtained across theentire measurement area 312 by setting the focus positions of thephotographing units 302 and 303 deeper than the measurement referencesurface 311. When the focus positions of the photographing unit 302 and303 are set on the measurement reference surface 311, it is necessary toincrease the contrasts of photographed images by improving the imagingperformance of the photographing units 302 and 303 or increase theamount of light projected by the projection unit 301, in order to obtainnearly the same measurement accuracy as in this embodiment across theentire measurement area 312. However, this embodiment obviates the needfor this operation and, in turn, obviates the need to improve theimaging performance of the photographing units 302 and 303 more thanrequired. This makes it possible to reduce the numbers of lenses whichconstitute the photographing units 302 and 303, leading to overall costsavings. Also, keeping the power of a light source of the projectionunit 301 low makes it possible to reduce the power consumption and theamount of heat generated by the light source, thus downsizing a coolingsystem and eventually the entire apparatus.

According to the present invention, it is possible to suppressdegradation in measurement accuracy in the depth direction to obtaingood measurement accuracy across the entire measurement area.

Other Embodiments

Aspects of the present invention can also be realized by a computer of asystem or apparatus (or devices such as a CPU or MPU) that reads out andexecutes a program recorded on a memory device to perform the functionsof the above-described embodiment(s), and by a method, the steps ofwhich are performed by a computer of a system or apparatus by, forexample, reading out and executing a program recorded on a memory deviceto perform the functions of the above-described embodiment(s). For thispurpose, the program is provided to the computer for example via anetwork or from a recording medium of various types serving as thememory device (for example, computer-readable storage medium).

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2011-228273 filed on Oct. 17, 2011, which is hereby incorporated byreference herein in its entirety.

1.-10. (canceled)
 11. A three dimensional shape measurement apparatuscomprising: a projection unit configured to project a stripe patternincluding a light portion and a dark portion to a measurement area; aphotographing unit configured to photograph a target object in themeasurement area while the stripe pattern is projected by the projectionunit, wherein the photographing unit has single image sensing elementand single focus position; a detection unit configured to detect an edgeposition representing a boundary between a light portion and a darkportion based on an image photographed by the photographing unit; and ameasurement unit configured to measure a three dimensional shape of thetarget object based on the edge position detected by the detection unit,wherein a focus position of the photographing unit is set farther than aposition which is determined by an axis going through a center of aprojection range of the projection unit and an axis going through acenter of a photographing range of the photographing unit, when observedfrom the photographing unit, wherein the focus position of thephotographing unit is not set nearer than the determined position whichis determined by the axis going through the center of the projectionrange of the projection unit and the axis going through the center ofthe photographing range of the photographing unit, when observed fromthe photographing unit.
 12. The apparatus according to claim 11, whereina contrast value between the light portion and the dark portion in theimage photographed by the photographing unit has a maximum value in anarea farther than the position which is determined by the axis goingthrough the center of the projection range of the projection unit andthe axis going through the center of the photographing range of thephotographing unit, when observed from the photographing unit.
 13. Theapparatus according to claim 11, wherein the determined position is aposition of an intersection between the axis going through the center ofthe projection range of the projection unit and the axis going throughthe center of the photographing range of the photographing unit.
 14. Theapparatus according to claim 11, wherein the determined position is aposition where the axis going through the center of the projection rangeof the projection unit and the axis going through the center of thephotographing range of the photographing unit are closest for eachother.
 15. The apparatus according to claim 11, wherein the measurementunit measures the shape of the target object by a space encoding method.16. The apparatus according to claim 11, wherein the measurement unitmeasures the shape of the target object by a phase shift method.
 17. Theapparatus according to claim 11, wherein the focus position of thephotographing unit is fixed.
 18. The apparatus according to claim 11,wherein the number of image sensors of the photographing unit is one.19. A three dimensional shape measurement apparatus comprising: aprojection unit configured to project a pattern including a light partregion and a dark part region to a target object; a photographing unitconfigured to photograph the target object to which the pattern isprojected; a detection unit configured to detect an edge positionrepresenting a boundary between the light part region and the dark partregion based on an image photographed by the photographing unit; and ameasurement unit configured to measure a three dimensional shape of thetarget object based on the edge position detected by the detection unit,wherein a focus position of the photographing unit is, in a measurementarea that is within a predetermined range of region from a measurementreference plane including a position which is determined by an axisgoing through a center of a projection range of the projection unit andan axis going through a center of a photographing range of thephotographing unit, set farther than the measurement reference planewhen observed from the photographing unit, wherein a contrast valuebetween the light part region and the dark part region in the imagephotographed by the photographing unit has a maximum value in an areafarther than the position, when observed from the photographing unit.20. The apparatus according to claim 19, wherein the focus position ofthe photographing unit is not set nearer than the position which isdetermined by the axis going through the center of the projection rangeof the projection unit and the axis going through the center of thephotographing range of the photographing unit, when observed from thephotographing unit.
 21. The apparatus according to claim 19, wherein thedetermined position is a position of an intersection between the axisgoing through the center of the projection range of the projection unitand the axis going through the center of the photographing range of thephotographing unit.
 22. The apparatus according to claim 19, wherein thedetermined position is a position where the axis going through thecenter of the projection range of the projection unit and the axis goingthrough the center of the photographing range of the photographing unitare closest for each other.
 23. The apparatus according to claim 19,wherein the measurement unit measures the shape of the target object bya space encoding method.
 24. The apparatus according to claim 19,wherein the measurement unit measures the shape of the target object bya phase shift method.
 25. The apparatus according to claim 19, whereinthe focus position of the photographing unit is fixed.
 26. The apparatusaccording to claim 19, wherein the number of image sensors of thephotographing unit is one.
 27. A three dimensional shape measurementapparatus comprising: a projection unit configured to project a patternincluding a light portion and a dark portion to a target object; aphotographing unit configured to photograph the target object onto whichthe pattern is projected; a detection unit configured to detect an edgeposition representing a boundary between the light portion and the darkportion based on an image photographed by the photographing unit; and ameasurement unit configured to measure a three dimensional shape of thetarget object based on the edge position detected by the detection unit,wherein a focus position of the photographing unit is set farther than aposition which is determined by an axis going through a center of aprojection range of the projection unit and an axis going through acenter of a photographing range of the photographing unit, when observedfrom the photographing unit, such that a measurement error of the edgeposition determined based on a brightness of a photographed image and acontrast value of the photographed image in a first measurement planethat is a measurement plane nearest to the photographing unit becomessubstantially equal to a measurement error of the edge position in asecond measurement plane that is the farthest from the photographingunit, of measurement planes in a measurement area that is an area withina predetermined range from a measurement reference plane including theposition which is determined by the axis going through the center of theprojection range of the projection unit and the axis going through thecenter of the photographing range of the photographing unit.
 28. Theapparatus according to claim 27, wherein the focus position of thephotographing unit is not set nearer than the determined position whichis determined by the axis going through the center of the projectionrange of the projection unit and the axis going through the center ofthe photographing range of the photographing unit, when observed fromthe photographing unit.
 29. The apparatus according to claim 27, whereinthe determined position is a position of an intersection between theaxis going through the center of the projection range of the projectionunit and the axis going through the center of the photographing range ofthe photographing unit.
 30. The apparatus according to claim 27, whereinthe determined position is a position where the axis going through thecenter of the projection range of the projection unit and the axis goingthrough the center of the photographing range of the photographing unitare closest for each other.
 31. The apparatus according to claim 27,wherein the measurement unit measures the shape of the target object bya space encoding method.
 32. The apparatus according to claim 27,wherein the measurement unit measures the shape of the target object bya phase shift method.
 33. The apparatus according to claim 27, whereinthe focus position of the photographing unit is fixed.
 34. The apparatusaccording to claim 27, wherein the number of image sensors of thephotographing unit is one.
 35. A control method for a three dimensionalshape measurement apparatus including a projection unit, a photographingunit, and a measurement unit, the method comprising: a projection stepof causing the projection unit configured to project a stripe patternincluding a light portion and a dark portion to a measurement area; aphotographing step of causing the photographing unit configured tophotograph a target object in the measurement area while the stripepattern is projected by the projection unit, wherein the photographingunit has single image sensing element and single focus position; adetection step of detecting an edge position representing a boundarybetween a light portion and a dark portion based on an imagephotographed by the photographing unit; and a measurement step ofcausing the measurement unit configured to measure a three dimensionalshape of the target object based on the edge position detected by thedetection unit, wherein a focus position of the photographing unit isset farther than a position which is determined by an axis going througha center of a projection range of the projection unit and an axis goingthrough a center of a photographing range of the photographing unit,when observed from the photographing unit, wherein the focus position ofthe photographing unit is not set nearer than the position which isdetermined by the axis going through the center of the projection rangeof the projection unit and the axis going through the center of thephotographing range of the photographing unit, when observed from thephotographing unit.
 36. A control method for a three dimensional shapemeasurement apparatus including a projection unit, a photographing unit,and a measurement unit, the method comprising: a projection step ofcausing the projection unit configured to project a pattern including alight part region and a dark part region to a target object; aphotographing step of causing the photographing unit configured tophotograph the target object to which the pattern is projected; adetection step of detecting an edge position representing a boundarybetween the light part region and the dark part region based on an imagephotographed by the photographing unit; and a measurement step ofcausing the measurement unit configured to measure a three dimensionalshape of the target object based on the edge position detected by thedetection unit, wherein a focus position of the photographing unit is,in a measurement area that is within a predetermined range of regionfrom a measurement reference plane including a position which isdetermined by an axis going through a center of a projection range ofthe projection unit and an axis going through a center of aphotographing range of the photographing unit, set farther than themeasurement reference plane when observed from the photographing unit,wherein a contrast value between the light part region and the dark partregion in the image photographed by the photographing unit has a maximumvalue in an area farther than the position, when observed from thephotographing unit.
 37. A control method for a three dimensional shapemeasurement apparatus including a projection unit, a photographing unit,and a measurement unit, the method comprising: a projection step ofcausing the projection unit configured to project a pattern including alight portion and a dark portion to a target object; a photographingstep of causing the photographing unit configured to photograph thetarget object onto which the pattern is projected; a detection step ofdetecting an edge position representing a boundary between the lightportion and the dark portion based on an image photographed by thephotographing unit; and a measurement step of causing the measurementunit configured to measure a three dimensional shape of the targetobject based on the edge position detected by the detection unit,wherein a focus position of the photographing unit is set farther than aposition which is determined by an axis going through a center of aprojection range of the projection unit and an axis going through acenter of a photographing range of the photographing unit, when observedfrom the photographing unit, such that a measurement error of the edgeposition determined based on a brightness of the photographed image anda contrast value of the photographed image in a first measurement planethat is a measurement plane nearest to the photographing unit becomessubstantially equal to a measurement error of the edge position in asecond measurement plane that is the farthest from the photographingunit, of measurement planes in a measurement area that is an area withina predetermined range from a measurement reference plane including theposition which is determined by an axis going through the center of theprojection range of the projection unit and the axis going through thecenter of the photographing range of the photographing unit.
 38. Anon-transitory computer-readable storage medium storing a computerprogram for causing a computer to execute each step in a control methodfor a three dimensional shape measurement apparatus, the methodcomprising: a projection step of causing the projection unit configuredto project a stripe pattern including a light portion and a dark portionto a measurement area; a photographing step of causing the photographingunit configured to photograph a target object in the measurement areawhile the stripe pattern is projected by the projection unit, whereinthe photographing unit has single image sensing element and single focusposition; a detection step of detecting an edge position representing aboundary between a light portion and a dark portion based on an imagephotographed by the photographing unit; and a measurement step ofcausing the measurement unit configured to measure a three dimensionalshape of the target object based on the edge position detected by thedetection unit, wherein a focus position of the photographing unit isset farther than a position which is determined by an axis going througha center of a projection range of the projection unit and an axis goingthrough a center of a photographing range of the photographing unit,when observed from the photographing unit, wherein the focus position ofthe photographing unit is not set nearer than the position which isdetermined by the axis going through the center of the projection rangeof the projection unit and the axis going through the center of thephotographing range of the photographing unit, when observed from thephotographing unit.
 39. A non-transitory computer-readable storagemedium storing a computer program for causing a computer to execute eachstep in a control method for a three dimensional shape measurementapparatus, the method comprising: a projection step of causing theprojection unit configured to project a pattern including a light partregion and a dark part region to a target object; a photographing stepof causing the photographing unit configured to photograph the targetobject to which the pattern is projected; a detection step of detectingan edge position representing a boundary between the light part regionand the dark part region based on an image photographed by thephotographing unit; and a measurement step of causing the measurementunit configured to measure a three dimensional shape of the targetobject based on the edge position detected by the detection unit,wherein a focus position of the photographing unit is, in a measurementarea that is within a predetermined range of region from a measurementreference plane including a position which is determined by an axisgoing through a center of a projection range of the projection unit andan axis going through a center of a photographing range of thephotographing unit, set farther than the measurement reference planewhen observed from the photographing unit, wherein a contrast valuebetween the light part region and the dark part region in the imagephotographed by the photographing unit has a maximum value in an areafarther than the position, when observed from the photographing unit.40. A non-transitory computer-readable storage medium storing a computerprogram for causing a computer to execute each step in a control methodfor a three dimensional shape measurement apparatus, the methodcomprising: a projection step of causing the projection unit configuredto project a pattern including a light portion and a dark portion to atarget object; a photographing step of causing the photographing unitconfigured to photograph the target object onto which the pattern isprojected; a detection step of detecting an edge position representing aboundary between the light portion and the dark portion based on animage photographed by the photographing unit; and a measurement step ofcausing the measurement unit configured to measure a three dimensionalshape of the target object based on the edge position detected by thedetection unit, wherein a focus position of the photographing unit isset farther than a position which is determined by an axis going througha center of a projection range of the projection unit and an axis goingthrough a center of a photographing range of the photographing unit,when observed from the photographing unit, such that a measurement errorof the edge position determined based on a brightness of a photographedimage and a contrast value of the photographed image in a firstmeasurement plane that is a measurement plane nearest to thephotographing unit becomes substantially equal to a measurement error ofthe edge position in a second measurement plane that is the farthestfrom the photographing unit, of measurement planes in a measurement areathat is an area within a predetermined range from a measurementreference plane including the position which is determined by an axisgoing through the center of the projection range of the projection unitand the axis going through the center of the photographing range of thephotographing unit.